# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>

pkgname=devhelp
pkgver=3.24.0+7+gefb59e2
pkgrel=1
pkgdesc="API documentation browser for GNOME"
arch=(i686 x86_64)
license=(GPL)
url="https://wiki.gnome.org/Apps/Devhelp"
depends=(webkit2gtk)
makedepends=(pkgconfig python gnome-common git appstream-glib autoconf-archive gobject-introspection)
groups=(gnome-extra)
_commit=efb59e267e097110f20f6c4f4f66bfa5081a3a99  # gnome-3-24
source=("git://git.gnome.org/devhelp#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static --disable-Werror --disable-maintainer-mode
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
